Systems for and methods of automatically scheduling and executing in situ tests on electrical and mechanical systems

ABSTRACT

A testing platform tests an electrical and mechanical system such as an HVAC unit according to an algorithm that reduces the total testing time of the components of the system, while ensuring the safety of the system during system-wide testing. The platform uses constraints that are checked both before and during the testing to ensure that HVAC operating conditions are acceptable for starting and maintaining component tests. Preferably, the platform uses finite-state machines for each device to organize the component tests, allowing for monitoring of constraints and starting, pausing, and stopping component tests. Preferably, total test execution time is reduced by running component tests in parallel, running component tests based on loads of the components, or combinations of both.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This patent application is a continuation of U.S. patent applicationSer. No. 15/365,758 filed Nov. 30, 2016, now U.S. Pat. No. 10,578,327,which claims priority to U.S. Provisional Patent Application No.62/261,205 filed Nov. 30, 2015, and titled “An Automated System forScheduling and Executing In Situ Tests on Mechanical (HVAC) Systems,”which is hereby incorporated by reference in its entirety.

FIELD OF THE INVENTION

This invention is related to testing systems. More particularly, thisinvention is related to in situ testing of electrical and mechanicalsystems, such as HVAC systems.

BACKGROUND OF THE INVENTION

Testing custom complex deployments presents a challenge becauseindividually testing components will not reveal errors in systemintegration. Examples of a complex systems include electrical,mechanical, electro-mechanical, and HVAC systems. (To simplify thediscussion below, these systems are referred to as electrical andmechanical systems.) Instead, the components must be tested in place (insitu) to ensure that the system as a whole works as desired. Testing asingle system component must take into account and possibly modify theoperating conditions of the system as a whole. In a system with a largenumber of components and tests, this results in a complex testingprocedure that can take a relatively long time to complete because eachcomponent test requires establishing a new set of operating conditions.In addition, if tests will be run on a currently operating system, theability to establish arbitrary operating conditions is limited. Althoughtools exist that allow automated establishment of operating conditions,these tools lack the ability to coordinate and validate multipleoperating conditions across multiple tests.

BRIEF SUMMARY OF THE INVENTION

In accordance with the principles of the invention, an electrical andmechanical system having multiple components is tested by dynamicallycoordinating component tests to account for system conditions. A testingsystem uses a scheduling algorithm that minimizes the total run time ofthe component tests, such as by executing tests that can be run inparallel, together, while managing and monitoring the validity of theoperating conditions of the electrical and mechanical system.Preferably, the testing system implements lifecycle management for testsand operating conditions using well-defined finite-state machines(FSMs), allowing for pausing, canceling, restarting, and recovering oftests and conditions.

In a first aspect, a method of testing an electrical and mechanicalsystem that includes interconnected devices, each device including oneor more components, each component tested using a correspondingcomponent test, includes grouping the components into groups such thatall components in each of the groups are able to be tested in parallel;and dynamically scheduling execution of the component tests based oncriteria comprising the groupings and constraints for maintainingexecution of the component tests to minimize a total execution time ofthe component tests. The criteria also include states of each of the oneor more components. Preferably, the component tests are scheduled in anorder of decreasing loads on the devices. As one example, as usedherein, loads refer to computational, mechanical, or electrical loads onthe devices, or any combination thereof.

The method also includes executing the component tests based on thescheduling, and automatically monitoring changes in the states of thecomponents and updating at least one of the constraints based on anychanges.

In one embodiment, the method also includes selecting a first set of thecomponents for testing based on loads on the devices; selecting a secondset of the components for testing only after testing of the first set ofcomponents is completed; and selecting constraints to delay testing ofthe second set of components only after testing of the first set ofcomponents is completed.

Preferably, the method also includes detecting that one of thecomponents is unresponsive to a corresponding component test; placingthe unresponsive component into a recovery state; and updating theconstraints to indicate that the unresponsive component is removed fromthe groupings so that it is no longer considered when coordinatingtesting.

In one embodiment, the electrical and mechanical system includes aheating, ventilation, and air-conditioning unit, and the componentsinclude a chiller, a fan, a valve, a duct, an airflow sensor, athermometer, a heating coil, a vent, a pump, variable air volume boxes,a radiator, a boiler, an actuator, or any combination thereof.

Preferably, the method also includes associating a finite-state machinewith each of the devices, wherein states of a finite-state machinecorrespond to a corresponding component test, and automaticallygenerating the finite-state machines from the constraints.

In a second aspect of the invention, a testing system for testing anelectrical and mechanical system having multiple interconnected deviceseach having one or more components includes multiple finite-statemachines each corresponding to one of the multiple interconnecteddevices, wherein states of the multiple finite-state machines correspondto component tests for testing components of the multiple devices; and ascheduler for dynamically controlling the multiple finite-state machinesto execute the component tests such that a total execution time of themultiple component tests is minimized.

In one embodiment, the testing system also includes test enabler setscomprising constraints that must be satisfied for one or more of thecomponent tests to execute, wherein the scheduler queries the testenabler sets before starting one or more of the component tests; andtest safety sets including constraints that must be satisfied for one ormore of the component tests to continue running, wherein the schedulerqueries the test enabler sets before stopping execution of one or moreof the component tests.

Preferably, the testing system also includes a condition finite-statemachine for monitoring results of the component tests and updating theconstraints based on the results, and a description file comprising ofphysical interconnections of the one or more components and a state ofeach of the one or more components.

In one embodiment, the multiple finite-state machines and the conditionfinite-state machine communicate using asynchronous messages.

In one embodiment, the electrical and mechanical system includes aheating, ventilation, and air-conditioning unit, and the componentsinclude a chiller, a fan, a valve, a duct, an airflow sensor, athermostat, a heating coil, a vent, a pump, variable air volume boxes, aradiator, a boiler, an actuator, or any combination thereof.

Preferably, the testing system is coupled to the electrical andmechanical system over a network, such as a cloud network. In otherembodiment, the testing system is coupled to the electrical andmechanical system over a local area network, or is even housed at a samelocation as the electrical and mechanical system.

The testing system also includes a computer-readable medium storingcomputer-executable instructions that execute an algorithm associatedwith the scheduler and the multiple finite state machines, and theconstraints.

In one embodiment, each of the components has an associated test listpackage including one or more test lists, wherein each test listcomprises a list of component tests for testing operation of acomponent.

In a third aspect, of the invention, a method of testing an electricaland mechanical system comprising interconnected devices, each deviceincluding one or more components, each component tested using acorresponding component test, the method includes ranking the devicesbased on loads on the devices; selecting a first set of conditions thatallow component tests to be executed on a first set of components ondevices with higher loads before component tests are executed on asecond set of components on devices with smaller loads; selecting asecond set of conditions that postpone execution of the component testson the second set of components to effect the first set of conditions;and scheduling execution of the component tests using the first andsecond sets of conditions. Preferably, the component tests are embodiedin finite-state machines. In one embodiment, the electrical andmechanical system includes a heating, ventilation, and air-conditioningunit.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The following figures are used to illustrate embodiments of theinvention. In all the figures, the same label refers to the identical ora similar element.

FIG. 1 is a high-level diagram of a testing platform coupled over acloud network to an electrical and mechanical system in accordance withone embodiment of the invention.

FIG. 2 is a high-level diagram of an HVAC system, using to explain theprinciples of the invention.

FIG. 3 is a block diagram of components of a testing platform inaccordance with one embodiment of the invention.

FIGS. 4A and 4B show tables describing scheduling of component tests inaccordance with one embodiment of the invention.

FIG. 5 shows the states of a finite-state machine for executingcomponents tests in accordance with one embodiment of the invention.

FIG. 6 is a flow chart showing the steps of an algorithm for minimizingthe total testing time of a mechanical device having multiple componentsin accordance with one embodiment of the invention.

FIG. 7 is a flow chart showing the steps of an algorithm for minimizingthe total testing time of an electrical and mechanical device havingmultiple components in accordance with another embodiment of theinvention.

DETAILED DESCRIPTION OF THE INVENTION

In accordance with the principles of the invention, an electrical andmechanical system having one or more devices, each having one or morecomponents, is tested by performing component tests on each component.The component tests are scheduled to minimize the total execution timeof the component tests, and thus the testing time of the entireelectrical and mechanical system. Preferably, the total system testingtime is minimized by performing in parallel those component testscapable of being performed in parallel, taking into account testingconstraints such as prerequisites (e.g., before monitoring airtemperature from a chiller, ensuring that the cooler is on) and safetyconstraints (e.g., while circulating air from a fan, ensuring that adownstream duct is open) that must be continuously satisfied duringsystem testing. In one embodiment, the system execution time is furtherreduced by performing component tests on components of devices havinghigher loads before performing component tests on components of deviceshaving lower loads.

In one embodiment, a testing system in accordance with the inventionincludes (1) a language which allows specifying, for each componenttest, lists of prerequisites, composed using elementary prerequisites,(2) a set of parameterized finite-state machines (FSMs) whoseconfiguration is automatically generated from the lists ofprerequisites, each assigned for testing device, and (3) a safe andminimum time scheduler that dynamically coordinates and executesparallel tests by assigning the FSMs to the HVAC components andscheduling their execution time.

In operation, the results of the tests are able to be used to generatereports, dispatch maintenance crews to repair or replace faultycomponents, or automatically swap in redundant components, to name onlya few such actions.

FIG. 1 shows a testing platform 101 coupled over a cloud network 105 toan electrical and mechanical system 150, with multiple electrical andmechanical devices 120A-Z, housed in a structure 170, in accordance withone embodiment of the invention. In one embodiment, the electrical andmechanical system 150 comprises a heating, ventilation, andair-conditioning (HVAC) system that services a building 170. While FIG.1 shows a single electrical and mechanical system 150, it will beappreciated that in other embodiments, a testing platform is configuredto test multiple electrical and mechanical devices within a singlebuilding or across multiple locations. As explained in more detailbelow, the electrical and mechanical devices 120A-Z each includes one ormore components tested using the testing platform. For example, when theelectrical and mechanical system is an HVAC unit, the components includefilters, pumps, input and exhaust fans, heating coils, actuators,cooling towers, chillers, dampers, sensors, variable air volume terminal(VAV) units, and the like, each tested according to a corresponding“Component test.” After reading this disclosure, those skilled in theart will recognize other components that are able to be tested in-situin accordance the principles of the invention.

In one embodiment, the testing platform 101 tests the components of theelectrical and mechanical devices 120A-Z using a scheduling algorithmthat efficiently schedules and dispatches Component tests in a way thatminimizes the total execution time of the Component tests, whileensuring the safety of the electrical and mechanical system 150.Preferably, the testing system 101 only starts Component tests whencertain prerequisites or constraints (“Test enabler sets”) are met andensures the safety by allowing Component tests to continue running onlywhen other constraints (“Test safety sets”) are met. Preferably, thestates of the components (e.g., on, off, open, closed, unresponsive) aretested before some Component tests are executed and continuouslymonitored while Component tests are executing.

In some embodiments, constraints are able to be set so that Componenttests are executed at only specified times. For example, constraints canbe set so that tests are executed only between certain hours, when abuilding is unoccupied, such as late at night or on weekends.

By implementing the testing platform 101 in the cloud, customers do nothave to install extra hardware for automated commissioning. Furthercloud-based equipment testing enables test results to be analyzed fromanywhere, not just on site. Nevertheless, in other embodiments, thetesting platform 101 is implemented on site, housed in the structure 170or coupled to the electrical and mechanical system 150 by local areanetworks, Ethernet networks, or other systems.

FIG. 2 is a diagram of an HVAC unit 200 used to illustrate principles ofthe invention. The HVAC unit 200 comprises a filter 205 coupled inseries with an input fan 210, coupled in series with a chiller 220,coupled in parallel to different zones in a building through dampers 225and 230, both of which are coupled in series to an exhaust fan 240. Thechiller 220 is coupled to a water tower 225. It will be appreciated thatfor the fans 210 and 240 to be safely tested (e.g., so that pressuredoes not build within the HVAC unit 200 to unacceptable levels) thedampers 225 and 230 must both be open. In this example, the state ofdampers being open is a prerequisite (constraint) stored, in oneembodiment, in a Test enabler set on the testing platform. The testingplatform ensures that this prerequisite is met before executing theComponent test for testing the fans 210 and 240.

It will also be appreciated that the total testing time of all theComponent tests on the HVAC unit 200 can be reduced by performingComponent tests on the dampers 225 and 230, in parallel, rather than inseries. That is, the Component tests for the dampers overlap for atleast a portion of their execution times.

FIG. 3 is a block diagram of a testing platform 300 in accordance withone embodiment of the invention. The testing platform 300 includes aprocessor 301, and a computer-readable medium 310 containing bothcomputer-executable instructions and storage. The computer-readablemedium 310 stores a scheduler 315, an electrical and mechanical systemdescriptor file 320, a test library 325, finite-state machines (FSMs)330A-Z, a condition FSM 335, Test enabler sets 340, and Test safety sets345, all described in more detail below. The computer-executableinstructions, when executed by the processor 301, execute the steps ofscheduling algorithms in accordance with embodiments of the invention,as well as execute the FSMs.

The electrical and mechanical system descriptor file 305 contains a listof the components of an electrical and mechanical system (e.g., 200),possible states of each component, and the interconnections between thecomponents (e.g., physical layout). As one example, the file 320describes that a chiller A is connected on the water side to a coolingtower CT3 and a pump P4 and on the air side to an air handling unit AH4,which is serving VAV boxes 57 to 78. The file 320 indicates that AH4 hasa load of 22 (e.g., the number of VAV boxes that it serves), which thescheduler 301 preferably uses to schedule the component tests on AH4. Indifferent embodiments, the file 320 is pulled or inferred from businessservice management (BSM) data, is provided by a user, or is provided orotherwise determined from a combination of both.

The test library 310 contains component tests. Each component testincludes finite-time constrained operations of one or more systemcomponents. A component test is expected to affect an output, state, orboth of a component in response to changes in the input to thecomponent. As one example, a VAV Airflow Sensor Test (AFS test) measuresthe response of a VAV box's airflow sensor in response to the movementof its damper position through a set of sequence of positions. The AFStest passes when the airflow increases along the opening on the damperand fails when no increase is measured. As a second example, a heater istested by changing a temperature control setting through a range ofvalues and using a thermostat to measure the generated temperature. Theheater Component test is passed when the measured temperaturecorresponds to the control setting and fails if it does not.

Each of the tests has zero or more constraints, including, as describedabove, “Test enabler sets,” which must be satisfied for a test to run,and “Test safety sets,” which must be maintained during testing toensure the safety of the entire electrical and mechanical system. As anillustration of test enabler sets, cold temperature must be provided fortesting a VAV box, such as by turning on a chiller or packaged airconditioning unit. In one embodiment, this is achieved by enabling asupply air temperature override signal and sending an override set pointsignal to the chiller or AC unit to force the chiller or AC unit tolower its supply side temperature. As an illustration of Test safetysets, when providing cold air from a packaged AC unit or air handler,the duct pressure must be controlled to a safe level. The pressure inthe duct can be relieved by locking open the dampers of a specifiednumber of VAV boxes connected to the unit which are not undergoingautomated testing. It will be appreciated that, for a given test, Testenabler sets and Test safety sets can have common constraints.

FIGS. 4A and 4B show, respectively, Table 1 and Table 2, illustratingconstraints used by a scheduler to coordinate the execution of componenttests Test 1, Test 2, and Test 3 on VAV boxes VAVC-1, VAVC-2, and VAVC-3(not shown) in accordance with one embodiment of the invention. In thisexample, VAVC-1, VAVC-2, and VAVC-3 depend on a prerequisite from apackaged unit that requires a Safety set of size 1. VAVC-1 is tested byrunning one test, VAVC-2 is tested by running two tests, and VAVC-3 istested by running three tests. Referring to FIG. 4A, based on criteriain a Safety set, at time T1, Component Test 1 is run on VAVC-1 andVAVC-2, while no tests are run on VAVC-3. Next, at Time T2, based oncriteria in the Safety set, no tests are run on VAVC-1, Component Test 2is run on VAVC-2, and Component Test 1 is run on VAVC-3. Next, at TimeT3, based on criteria in the Safety set, no tests are run on VAVC-1,VAVC-2 is placed in an Idle state, and Component Test 2 is run onVAVC-3. Next, at Time T4, all the criteria in the Safety set have beenmet. At this time, Component Test 3 is run on VAVC-3.

Referring to FIG. 4B, based on criteria in a Safety set, at time T1, notests are run on VAVC-1, and Component Test 1 is run on VAVC-2 andVAVC-3. Next, at Time T2, based on criteria in the Safety set, no testsare run on VAVC-1, and Component Test 2 is run on VAVC-2 and VAVC-3.Next, at Time T3, based on criteria in the Safety set, Component Test 3is run on VAVC-3.

In preferred embodiments, finite-state machines (FSMs) are used toschedule, dispatch, coordinate, and monitor Component tests. An FSM isassigned to each device. For a device, the FSM has states correspondingto a sequence of actions to be performed on the device. Thus, inaccordance with the embodiments, a scheduler continuously issuesinstructions to coordinate the FSMs. In this way, the system allows formore resilience to real-world failures than the execution on apre-planned system-wide action sequence.

FIG. 5 illustrates an FSM 500 for testing a device (e.g., a fan) having2 components (e.g., an actuator and a speed control) in accordance withone embodiment of the invention. Thus, the fan is tested by running twotests, Test 1 and Test 2. In this example, the FSM 500 begins in theStart state 501, in which it may wait until Test enabler set constraintsare met. If prerequisites exist and are met, the FSM 500 transitions tothe Test 1 state 505, in which a Component Test 1 is executed. IfComponent Test 1 executes successfully, the FSM 500 transitions to Test2 state 530, in which Component Test 2 is executed. If in Test state505, Component Test 1 is paused (e.g., by a constraint changing,requiring that component wait until the completion of an event), the FSM500 enters a Pause state 510. The FSM 500 will transition from the Pausestate 510 back to the Test 1 state only after the criteria has beenupdated (e.g., the event triggering the pause has completed). If in Teststate 505, Component Test 1 is restarted, the FSM 500 enters a Restartstate 520, in which parameters for performing Test 1 are reset (e.g.,re-initialized). For example, if a duct must be opened sequentially froma starting position to an ending position, the position is re-set to thestarting position. If in Test state 505, events determine that arecovery is necessary, the FSM 500 transitions to a Recovery state 560,in which any recovery operations are performed, from which the FSM 500transitions the Exit state 570. In a similar manner, the FSM 500transitions from the Test 2 state 530 to a Restart state 540, a Pausestate 550, a Recovery State 560, and the Exit state 570.

It will be appreciated that the FSM 500 is merely illustrative of oneexample. In accordance with the principles of the invention, other FSMsare generated, tailored to specific components, operating requirements,and specifications, to name only a few criteria.

In one embodiment, the FSM 500 receives input about Test safety sets,used for its state transitions, from a “conditions” FSM (not shown),which establishes and maintains each upstream operating condition sothat operating conditions can be established as required by the currentscheduler plan. This allows tests to be run when conditions can be met,avoiding external load and usage constraints. If the constraints becomeinvalid during the lifetime of the operating conditions, the conditionFSM will undo the requested operating conditions and the dependent teststate machines will shut down their tests.

Isolating each device's sequence of actions into an FSM responsible forexecuting it provides several advantages. Instead of blindly executingthe combined scheduled event sequences in order, the FSMs allow theability to react to a failure by sending only the effected FSMs into arecovery state, allowing other FSMs to continue executing. A systemusing FSMs is also easily scalable. For example, in one embodiment, thetesting platform is programmed using an object-oriented programminglanguage. In these embodiments, FSMs are instantiated from easilyconfigurable templates. Preferably, FSMs are automatically generatedfrom criteria such as the Test enabler sets and the Test safety sets.

In one embodiment, after FSMs are generated, the scheduler dispatchesthe FSMs according to a scheduling algorithm that minimizes totalexecution time while maintaining system safety. In one embodiment, thealgorithm groups Component tests for components capable of executing inparallel based on the system constraints. For example, in FIG. 2, theducts 225 and 230 are able to be tested in parallel. FIG. 6 shows thesteps 600 of an algorithm in accordance with one embodiment. After thestart step 601, in the step 610 the Component tests for each device aregrouped such that, based on the current constraints, Component tests ineach group are capable of being executed in parallel. For each device, acomponent test is removed from a group once it has completed or it isdetermined that the device is non-responsive. Next, in the step 620, theComponent tests are executed (e.g., using the FSMs) according to thegroupings. Next, in the step 630 the results of the Component tests aremonitored, and in the step 640, the constraints and current status ofthe Component tests (e.g., paused, completed, etc.) are updated. It willbe appreciated that, in some embodiments statuses and states are updatedasynchronously, such as using a “condition” FSM described below. Next,in the step 650, it is determined whether more devices are to be tested.If more devices are to be tested, the method loops back to the step 610.Otherwise, the method continues to the step 650, in which a test resultsreport is generated, from which the method continues to the step 660, inwhich it ends.

It will be appreciated that while FIG. 6 shows sequential steps,monitoring and updates (e.g., step 630) are able to be performedasynchronously, such as by using asynchronous message passing.

It will be also appreciated that the steps 600 are merely exemplary.Like all of the algorithms described herein, in different embodiments,some of the steps can be deleted, others can be added, some can becombined, and the order can be changed.

It will be appreciated that other scheduling algorithms are able to beused in accordance with the present invention. For example, inaccordance with another embodiment, an algorithm schedules events byiteratively selecting one that requires the most overloaded resource(e.g., device) to run. The algorithm is thus easily scalable. Thealgorithm uses a heuristic based on the assumption that by schedulingcomponent tests and other events on overloaded resources earlier, thoseresources will have a relatively reduced load later in the schedule.Thus, the schedule will not be unnecessarily extended by a chain ofevents that must occur serially (and could have been started sooner), atthe end of the schedule. Additionally, due to its iterative nature, theschedule is able to be made “on the fly” and adjusts itself based on thestate of the system part way through the occurrence of events. Thus,this solution to minimizing the testing time is characterized as adynamic constraint satisfaction problem (DCSP) rather than a CSP.

When certain conditions involve the necessary delaying of other events(for instance, delaying a test on a VAVC because it must demand cold airfrom its supplying packaged unit so another test depending on the coldair can run), the algorithm for minimizing the total testing time can besplit into two phases. The first phase involves selecting the conditionsthat will allow events on the most overloaded resources to run, and thenselecting events on the least overloaded resources to postpone in orderto create the necessary conditions. In the second phase, using the setof conditions that are present in the system, events are selected withthe intention of reducing the load of the most overloaded resources asquickly as possible, that is, by executing the events on the mostoverloaded resources before executing the events on the less overloadedresources. Depending on the reliability and latency of creating a givencondition, these phases can be more or less tightly coupled. Ifconditions can be created instantaneously, there is no need to decouplethe two phases, as conditions can be created with a specific test inmind. However, if many events can occur in the time span it takes tocreate a single condition, or the time it takes to create a condition isnot well-known, the conditions should be chosen such that a pool oftests depending on the overloaded resources will be capable of running.

Extra conditions may be enforced on the scheduler if the tested systemis fully operational. For instance, in an HVAC system, the scheduler canadd constraints to avoid times when some or all of the serviced buildingare occupied. The scheduler can also avoid times when the upstreamdependencies of the systems of the system are fully loaded and thuswould suffer in performance when trying to create testing conditions.

FIG. 7 shows the steps 700 of an algorithm in accordance with oneembodiment of the invention. After the start step 701, in the step 710,devices are ranked based on their loads, with devices having higherloads ranked higher than devices having smaller loads. Next, in the step720, conditions that allow events on the most overloaded resources torun are selected. Next, in the step 730, conditions that allow events onthe least overloaded resources to postpone are selected. Together, thesteps 720 and 730 create the necessary conditions. Next, in the step740, events are selected to reduce the load on the most overloadedresources.

In one embodiment, the loads are reduced on the most overloadedresources by running component tests on the most overloaded resourcesearlier in the testing cycle than tests on the least overloadedresources. As used herein, loads can be computational (e.g., a number ofcomputational steps for taking an action on a device), electrical (e.g.,a current drawn or a voltage sourced), mechanical (e.g., a total numberof devices coupled to a component), or some combination of these, toname only a few examples.

In one embodiment, the algorithm of FIG. 7 is stored on acomputer-readable medium (e.g., 310, FIG. 3) as computer-readableinstructions for performing the sequence of steps 700 executed by aprocessor (e.g., 301, FIG. 3). Preferably, states of the resourcesduring events (e.g., during component testing) are embodied in FSMs,such as shown in FIG. 5.

For an electrical and mechanical system having multiple devices, eachhaving components, a scheduler coordinates execution of separatecomponent tests, by ensuring that the total system testing time isreduced while maintaining safety during testing. A descriptor file isparsed to determine the components and their physical interconnections.Component tests are determined for each component, and constraints aredetermined for, among other things, ensuring system safety duringtesting. The constraints are used to generate finite-state machines,each corresponding to testing a device, and thus the device's separatecomponents. The scheduler executes the FSMs according to an algorithm,which constantly monitors and updates the constraints to ensure propertesting. Finally, the results of the component tests are analyzed, togenerate reports, dispatch service personnel to repair or replacemalfunctioning equipment, or take other appropriate steps.

Systems in accordance with the invention are adaptable, relying on ascheduling heuristic that is computationally inexpensive, employable onthe fly to calculate the test set's next move at each step, rather thanpre-computing the entire sequence of actions once at the beginning. Byusing elements such as finite-state machines, the systems are alsorobust, allowing for efficient recovery. For example, if an FSMresponsible for holding a VAV box as a member of a safety set forupstream equipment prerequisite constraint goes into an error statebecause the box's controller is unresponsive, the scheduler recognizesthis and will instantiate another FSM on another box to use instead, andplan its tests around this change accordingly. Further, because thesystems use schedulers that are continuously updated, the systems areresilient to individual equipment failures which occur after schedulingis complete.

The embodiments given above are shown merely for illustration and arenot meant to limit the scope of the invention. It will be readilyapparent to one skilled in the art that other modifications may be madeto the embodiments without departing from the spirit and scope of theinvention as defined by the appended claims.

We claim:
 1. A method of testing an electrical and mechanical systemincluding interconnected devices, each device including one or morecomponents, the method comprising: identifying a component test for eachcomponent tested; grouping components of the interconnected devices intogroups such that components in each of the groups are tested inparallel; dynamically scheduling execution of the component tests tominimize a total execution time of the component tests based on criteriaincluding the groups, at least one prerequisite constraint for startingexecution of the component tests, and at least one prerequisite safetyconstraint for maintaining execution of the component tests; andexecuting the component tests on the interconnected devices based on thescheduling.
 2. The method of claim 1, wherein the criteria furtherinclude states of at least one of the components.
 3. The method of claim2, further comprising monitoring changes in the states of the componentsand updating at least one of the constraints based on the changes in thestates of the components.
 4. The method of claim 3, wherein the at leastone of the constraints is updated asynchronously.
 5. The method of claim1, further comprising: selecting a first set of the components fortesting based on loads on the devices; selecting a second set of thecomponents for testing only after testing of the first set of thecomponents is completed; and selecting constraints to delay testing ofthe second set of the components only after testing of the first set ofthe components is completed.
 6. The method of claim 1, furthercomprising: detecting a component that is unresponsive to acorresponding component test; placing the unresponsive component into arecovery state; and updating the constraints to indicate that theunresponsive component is removed from the groups.
 7. The method ofclaim 1, wherein the components are selected from the group consistingof a chiller, a fan, a valve, a duct, an airflow sensor, a thermometer,a heating coil, a vent, a pump, variable air volume boxes, a radiator, aboiler, an actuator, and any combination thereof.
 8. The method of claim1, further comprising associating a finite-state machine with eachdevice of the interconnected devices, wherein states of a finite-statemachine correspond to a corresponding component test.
 9. The method ofclaim 8, further comprising automatically generating the multiplefinite-state machines from the constraints.
 10. A testing system fortesting an electrical and mechanical system comprising: a processor; anda computer readable medium in communication with the processor andhaving stored thereon computer-executable instructions, which, whenexecuted by the processor, cause the processor to perform a test method,the computer-executable instructions including: multiple finite-statemachines, each finite state machine corresponding to one or moreinterconnected devices of the electrical and mechanical system, whereinstates of the multiple finite-state machines correspond to componenttests for testing components of the one or more interconnected devices;and a scheduler configured to (a) query at least one test enabler set,which includes constraints to satisfy in order for one or more componenttests to continue executing, before starting the one or more componenttests, (b) dynamically control the multiple finite-state machines toexecute the component tests according to groups of the components suchthat components in each group are tested in parallel such that a totalexecution time of the component tests is minimized, and (c) query atleast one test safety set, which includes constraints to satisfy inorder for one or more component tests to continue executing, beforestopping execution of the one or more component tests.
 11. The testingsystem of claim 10, wherein the computer-executable instructions furthercomprise a condition finite-state machine for monitoring results of thecomponent tests and updating the constraints based on the results. 12.The testing system of claim 10, wherein the computer readable medium hasstored thereon a description file including: a description of physicalinterconnections of one or more components; and a state of each of theone or more components.
 13. The testing system of claim 10, wherein theelectrical and mechanical system includes a heating, ventilation, andair-conditioning unit.
 14. The testing system of claim 13, wherein thecomponents are selected from the group consisting of a chiller, a fan, avalve, a duct, an airflow sensor, a thermometer, a heating coil, a vent,a pump, variable air volume boxes, a radiator, a boiler, an actuator,and any combination thereof.
 15. The testing system of claim 10, whereinthe testing system is coupled to the electrical and mechanical systemover a network.
 16. The testing system of claim 15, wherein the networkincludes a cloud network.
 17. The testing system of claim 10, whereineach component includes an associated test list package, wherein thetest list package includes one or more test lists, and wherein each testlist of the one or more test lists includes a list of component testsfor testing operation of a component.